package com.pointstar.dp.modules.project.service.impl;

import com.pointstar.dp.common.entity.Page;
import com.pointstar.dp.common.entity.Query;
import com.pointstar.dp.common.entity.R;
import com.pointstar.dp.common.utils.CommonUtils;
import com.pointstar.dp.modules.project.dao.InBoundDetailsMapper;
import com.pointstar.dp.modules.project.dao.InOutBoundMapper;
import com.pointstar.dp.modules.project.dao.OutBoundDetailsMapper;
import com.pointstar.dp.modules.project.dao.OutBoundMapper;
import com.pointstar.dp.modules.project.entity.InBoundDetailsEntity;
import com.pointstar.dp.modules.project.entity.OutBoundDetailsEntity;
import com.pointstar.dp.modules.project.entity.OutBoundEntity;
import com.pointstar.dp.modules.project.entity.dto.InOutBoundDTO;
import com.pointstar.dp.modules.project.entity.ro.SaveOutBoundRo;
import com.pointstar.dp.modules.project.service.InOutBoundService;
import com.pointstar.dp.modules.project.service.OutBoundService;
import com.pointstar.dp.modules.project.util.CommonUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.math.BigDecimal;
import java.util.Map;

/**
 * 出库主表
 * @author Korey<m13057531285@163.com>
 */
@Service("inOutBoundService")
public class InOutBoundServiceImpl implements InOutBoundService {


	private final InOutBoundMapper inOutBoundMapper;

	@Autowired
	public InOutBoundServiceImpl(InOutBoundMapper inOutBoundMapper) {

		this.inOutBoundMapper = inOutBoundMapper;
	}


	/**
	 * 分页查询
	 * @param params
	 * @return
	 */
	@Override
	public Page<InOutBoundDTO> listAnaylse(Map<String, Object> params) {
		Query query = new Query(CommonUtil.setTime(params));
		Page<InOutBoundDTO> page = new Page<>(query);
		inOutBoundMapper.listForPage(page, query);
		return page;
	}



}
